

<%@ page language="java" contentType="text/html;charset=gb2312" pageEncoding="UTF-8"%>
<%@ page import="test.Tutor" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>导师搜索结果</title>

<style type="text/css"> 
div { 
	position:absolute; 
	top:30%; 
	left:30%;
} 
</style> 
</head>
<body>
<div>
	<p align="center">导师搜索结果</p>
	<% 
		List<Tutor> list2;
		Tutor tmpTutor=null;
		int i = 0;
		list2 = (List<Tutor>) request.getSession().getAttribute("tutorList");
		out.println("<table border=1>");
		out.println("<tr><td>导师ID</td><td>姓     名</td><td>电话</td><td>研究领域</td></tr>");
		if(list2.size() > 0)
		{
			for (i=0; i<list2.size(); i++)
			{
				tmpTutor = null;
				tmpTutor = (Tutor)list2.get(i);
	
				out.println("<tr><td>"+ tmpTutor.getTutorid()
						+"</td><td>"+ tmpTutor.getTutorname()
						+"</td><td>"+ tmpTutor.getTutorphone()
						+"</td><td>"+ tmpTutor.getTutorfield()
						+"</td></tr>");
			
			}
			
		}
		else
		{
			out.print("数据库中没有你想要的东西！\n");
		}
	%>
</div>
</body>
</html>